
Page({
  data: {
    address: '',
    type: '',
    info: '',
    contact: '',
    id: 0
  },
  onLoad(options) {
    wx.request({
      url: 'http://rap2api.taobao.org/app/mock/224284/api/v1/pet/' + options.id,
      success: res => {
        const {address, contact, id, info, type} = res.data.data
        this.setData({
          address,
          type,
          info,
          contact,
          id
        })
      }
    })
  },
  // 回到首页
  backHome() {
    wx.navigateTo({
      url: '/pages/index/index',
    })
  }
})